<template>
  <el-upload
    :on-exceed="handleExceed"
    :on-remove="handleRemove"
    :before-remove="beforeRemove"
    :on-success="handleSuccess"
    :on-error="handelError"
    :file-list="fileList"
    list-type="text"
    v-bind="fld"
    size="mini">
    <el-button type="primary">{{fld.title}}</el-button>
  </el-upload>
</template>
<script>
  define(['vue','_vue!pathComponent/comp-image'],function(vue,compImage){
    return vue.component('comp-file',{
      extends: compImage,
      template:template,
      methods:{
        handleModelInput :function(val){
          this.$emit("input", val);
        },
        //val为更新后的值
        handleChange :function(val){
          var key = `${this.fld.name}:change`;
          if(!this.$root.callbacks[key]) return;
          this.$root.callbacks[key].apply(this,arguments);
        },
      }
    });  
  });
</script>